﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ModularFixture.CCoMFMappingReportCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using EngineeringInternalExtension;
using System.Resources;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.ModularFixture;

public class CCoMFMappingReportCmd : TxButtonCommand
{
  private CCoMFMappingReportCmdEnabler m_enabler;
  private CApMFMappingReportDataManager m_dataManager;

  public CCoMFMappingReportCmd() => this.m_enabler = new CCoMFMappingReportCmdEnabler();

  public virtual string Bitmap => this.GetResourceManager().GetString("MAPPING_REPORT_CMD_BITMAP");

  public virtual string Category
  {
    get => this.GetResourceManager().GetString("MAPPING_REPORT_CMD_CATEGORY");
  }

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this.m_enabler;

  public virtual string Description
  {
    get => this.GetResourceManager().GetString("MAPPING_REPORT_CMD_DESCRIPTION");
  }

  public virtual string Tooltip
  {
    get => this.GetResourceManager().GetString("MAPPING_REPORT_CMD_TOOLTIP");
  }

  public virtual string Name => this.GetResourceManager().GetString("MAPPING_REPORT_CMD_NAME");

  public virtual bool Connect() => true;

  private ResourceManager GetResourceManager()
  {
    return new ResourceManager("DnProcessSimulateCommands.ModularFixture.MappingReport.Res.ResourceTable", ((object) this).GetType().Assembly);
  }

  public virtual void Execute(object cmdParams)
  {
    if (!TxAssemblyInfoEx.IsExcelInstalled(true, ""))
      return;
    this.m_dataManager = new CApMFMappingReportDataManager();
    if (!this.m_enabler.Enable)
      return;
    this.m_dataManager.ProcessData(TxApplication.ActiveDocument.CurrentStudy);
  }
}
